package com.wxTest.web;

import java.io.IOException;
import java.io.InputStream;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class RecriverMsg extends HttpServlet {

	private static final long serialVersionUID = 1L;

	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		System.out.println(1231);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//解析xml
		InputStream inputStream = request.getInputStream();
		int readed = 0;
		byte[] buf = new byte[1024];
		StringBuilder sb = new StringBuilder();
		while((readed = inputStream.read(buf)) != -1){
			sb.append(new String(buf,0,readed));
		}
		System.out.println(sb.toString());
	}

}
